
#include "proj_image.h"
#include "proj_image_set.h"


void CB_Set_diff (CB_Set * A, CB_Set *B)
{
	for (int i=0; i<A->nproj; i++)
		for (int j=0; j<A->cbi[i]->dim[0]*A->cbi[i]->dim[1]; j++ )
			A->cbi[i]->img[j]-= B->cbi[i]->img[j];
}

double CB_Set_nrm (CB_Set * A)
{	double nrm=0.0f;
for (int i=0; i<A->nproj; i++)
for (int j=0; j<A->cbi[i]->dim[0]*A->cbi[i]->dim[1]; j++) 
nrm+=A->cbi[i]->img[j]*A->cbi[i]->img[j];
return nrm;
}



